package com.example.fresheveryday.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.fresheveryday.po.Comment;
import com.example.fresheveryday.po.Log;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.fresheveryday.po.Product;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ll
 * @since 2023-07-07
 */
@Mapper
public interface LogMapper extends BaseMapper<Log> {
    @Select("select * from" + " log  " )
    IPage<Log> getAllLog(IPage<Log> page);

    //动态查询
    @Select("select * from" + " log ${ew.customSqlSegment} " )
    IPage<Log> getLogByConditions(IPage<Log> page, @Param("ew") Wrapper wrapper);
    //
    @Select("select count(user_id) from log ${ew.customSqlSegment}")
    int countByConditions(@Param("ew") Wrapper wrapper);
}
